<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/1/25
 * Time: 20:51
 */
class Place_model extends MY_Model
{
    function __construct()
    {
        parent::__construct();
        $this->_table_name = 'place';
    }

    function get_by_city($city_id){
        $this->db->where('city_id',$city_id);
        $query = $this->db->get($this->_table_name);
        if($query->num_rows()>0){
            return $query->result_array();
        }
        return null;
    }
}